package cn.example.gate.config;

import cn.example.gate.netty.session.NettySessionFactory;
import cn.example.gate.plugins.netty.NettyPluginFactory;
import cn.hutool.setting.Setting;
import org.artifact.core.lang.IConfig;
import org.artifact.core.lang.IContext;
import org.artifact.core.lang.Plugins;

/**
 * @author : SandKing
 * @CreateDate : 2019/12/9 17:26
 * @Description ：Please describe this document
 */
public class GateConfig implements IConfig {
    @Override
    public void configContext(IContext me) {
        // 设置配置文件
        me.setSetting(new Setting("app.properties"));


        me.setSessionFactory(new NettySessionFactory());
    }

    @Override
    public void configPlugin(Plugins plugins) {
        plugins.add(new NettyPluginFactory());
    }

    @Override
    public void afterServerStart() {

    }

    @Override
    public void beforeServerStop() {

    }
}
